package edu.sctu.alex.projectPratice.test20150628;

import java.io.File;
import java.io.IOException;

/**
 * Created by alex on 2015/6/28.
 */
public class FileMethods {

    /**
     * 创建JSON目录
     * @return
     * @throws IOException
     */
    public File addDir() throws IOException {

        File file = new File("D:\\JSON");
        if (!file.exists()) {
            file.mkdir();

        }
        return file;
    }

    /**
     *创建对应的txt文档
     * @throws IOException
     */
    public void addFile() throws IOException {

        File.createTempFile("Json",".txt",addDir());
        File.createTempFile("Appbean",".txt",addDir());

        }

}
